<?php
class PNAjaxDistrictArray extends PNObjectExArray {
  function PNAjaxDistrictArray($init=null, $where='')
  {
    $this->PNObject();

    $this->_objType       = 'votedatacenter_district';
    $this->_objField      = 'id';
    $this->_objPath       = 'form';

    $this->_init($init, $where);
  }

  function genSort(){

    return " ORDER BY dis_name ASC";

  }

  function genFilter(){
    $pro_id  = FormUtil::getPassedValue ('pro_id', false);
    $wheres = array();
    if ($pro_id && intval($pro_id)) $wheres[] = " dis_pro_id = ".$pro_id;

    return implode(' AND ', $wheres) ;
  }

}